@import "./common.less";
@import "./markdown.less";
@font_logo: FuturaPT;

.app-login-container {
  color: unset;
}

.app-login {
  cursor: pointer;
  display: inline-block;
  font-size: 1.1rem;
  padding: 8px 12px;

  .app-login-title {
    display: inline-block;
    margin-left: 4px;
  }

  .icon {
    font-size: 1.5rem;
    filter: drop-shadow(2px 3px 2px @shadow);
  }
}

.router-link-exact-active .app-login {
  background: #304ae0;
  border: 1px solid #6199ff;
  border-radius: 4px;
  text-shadow: none;

  .icon {
    filter: none;
  }
}

/* APP */
.update-dialog {
  .el-dialog {
    min-width: 320px;
  }

  .el-dialog__body {
    padding: 10px 20px;
  }
}

.update-item {
  .title {
    font-size: 1.25rem;
    margin: 4px 0;

    &::before {
      content: "";
      display: inline-block;
      height: 1.25rem;
      width: 4px;
      border-radius: 4px;
      background: #6199ff;
      margin: 0 8px -2px 2px;
    }
  }

  .date {
    text-align: right;
    margin-top: -1.6rem;
    font-size: 0.9rem;
    color: @text_grey;
  }

  .markdown-body {
    box-sizing: border-box;
    min-width: 200px;
    max-width: 980px;
    margin: 0 auto;
    padding: 14px;
  }
}

/* 字体 */
@font-face {
  font-family: FuturaPT;
  src: url("/fonts/FuturaBT.ttf");
}

@font-face {
  font-family: SAOUI;
  src: url("/fonts/SAOUI-Regular.otf");
}

/* 全局样式 */
.app-nav-pad {
  flex: 1;
}

.app-nav-menu {
  background: @theme_darker;
  color: @text_light;
  padding: 8px 0;
  position: fixed;
  overflow: hidden;
  z-index: 999;
  width: 100%;
  top: 50px;

  .menu-item {
    display: flex;
    align-items: center;

    &:hover {
      background: @theme_darker2;
    }

    &:active {
      background: @theme_lighter;
    }

    .icon {
      width: 4rem;
      height: 4rem;
      padding: 1.2rem;
    }
  }

  .menu-item.router-link-active {
    background: @theme_primary;
  }
}

.app-nav-button {
  background: @theme_primary;
  color: @text_light;
  border-color: @theme_primary;
  font-size: 22px;
  line-height: 1;
  padding: 6px 12px;
  border: 0;
  border-radius: 4px;
  box-sizing: border-box;
  outline: 0;
  -webkit-appearance: none;
  cursor: pointer;
  white-space: nowrap;

  &:active {
    border-color: @theme_highlight;
    background-color: @theme_highlight;
  }
}

/* ASIDE */
.pc-aside {
  background-color: @theme_back;
  color: @text_main;
  text-align: center;
  box-shadow: inset 0 0 8px 0px @shadow15;
  position: fixed;
  height: 100%;
  top: 60px;
}

.aside-nav-menu {
  .menu-item {
    .icon {
      font-size: 24px;
    }

    width: 100%;
    height: 60px;
    padding: 18px;
    cursor: pointer;
    overflow: hidden;
    background-color: transparent;
    transition: 0.2s;
    display: block;
    color: @theme_main;

    &:hover {
      background-color: @theme_main;
      color: @text_light;
    }
  }

  .menu-item.router-link-active {
    background-color: @theme_leaf;
    color: @text_light;
  }

  .menu-item-title {
    font-size: 16px;
    font-weight: normal;
    margin: 0;
    box-sizing: border-box;
    height: 100%;
    white-space: nowrap;
    float: left;
  }
}

.beta {
  font-size: 0.4em;
}

.main-header {
  position: fixed;
  width: 100%;
  display: flex;
  align-items: center;
  background-color: @theme_primary;
  color: @text_light;
  padding: 0 10px;
  box-shadow: 0 0 6px 0 rgba(0, 0, 0, 0.25);
  text-shadow: 2px 3px 2px rgba(0, 0, 0, 0.2);
  z-index: 1999;

  h1 {
    margin: 0 0 0 16px;
    font-weight: normal;
    font-family: @font_logo;
    font-size: 24px;
    user-select: none;
  }
}

.main-container {
  flex-basis: auto;
  display: block;
  flex: 1;
  background-color: @theme_mainback;
  color: @text_main;
  margin: 60px 0 0 60px;
  padding: 0;
  min-height: calc(100vh - 60px);
  width: calc(100vw - 60px);

  > * {
    margin: 14px;
  }

  .nosidebar & {
    width: 100vw;
    margin: 60px 0 0 0;
  }

  .nosidebar.fullpage & {
    width: 100vw;
    margin: 0;
  }
}

.site-logo {
  display: flex;
  align-items: inherit;
  cursor: pointer;
}

.right-side {
  float: right;
  height: 40px;

  &.fill {
    width: 50%;
  }
}

.header-watch {
  margin-left: 60px;
}

.i-mirror-logo {
  background-image: url("/img/LOGO@4x.png");
  background-size: 100%;
  width: 60px;
  height: 60px;
  background-repeat: no-repeat;
  background-position: center;
  float: left;
}

html,
body {
  margin: 0;
  width: 100%;
  display: flex;
  font-size: 14px;
  font-family: @font_main;
}

h1,
h2,
h3 {
  margin: 0;
  padding: 0;
}

.block {
  display: block;
  width: 100%;
}

.right {
  float: right;
}

.link-btn {
  color: @theme_main;

  &:hover {
    color: @theme_lighter;
  }
}

.padding {
  flex: 1;
}

* {
  box-sizing: border-box;
}

@media only screen and (max-width: 767px) {
  .main-header {
    height: 50px !important;

    h1 {
      font-size: 22px;
    }
  }

  .main-container {
    margin: 50px 0 0;
    min-height: calc(100vh - 50px);

    .nosidebar & {
      width: 100vw;
      margin: 50px 0 0;
    }

    .nosidebar.fullpage & {
      width: 100vw;
      margin: 0;
    }
  }

  .i-mirror-logo {
    width: 50px;
    height: 50px;
  }
}

@media only screen and (max-width: 360px) {
  .el-header {
    h1 {
      font-size: 18px;
    }
  }
}

/* 移动端缩小字体 */
@media only screen and (max-width: 444px) {
  html,
  body {
    font-size: 13px;
  }
}

.el-popover {
  max-width: calc(100vw - 35px);
}

@media only screen and (max-width: 444px) {
  .bigmode {
    &,
    body {
      font-size: 11px;
    }

    .autozoom {
      zoom: 0.7;
    }
  }
}

.invert-theme {
  // filter: invert(100%);

  .i-mirror-logo,
  [class*="-item-container"],
  .provis-container,
  .el-form-item,
  .el-tabs__nav,
  .el-dropdown-menu,
  .el-tag,
  .el-select-dropdown,
  .el-message-box,
  .el-button,
  .el-cascader,
  .el-cascader-menus,
  .el-radio__input,
  .copytext-input,
  .prop-number,
  .other-info > section {
    filter: invert(100%);
  }

  .el-tag.mod-dis,
  .el-button.btn-addriven {
    filter: unset;
  }
}

body {
  .el-switch__label {
    color: @text_main;
  }

  .el-switch__label.is-active {
    color: @theme_main;
  }

  .el-switch .el-switch__core,
  .el-progress-bar__inner {
    border-color: @text_sliver_light;
    background-color: @text_sliver_light;
  }

  .el-switch.is-checked .el-switch__core,
  .el-progress-bar__inner {
    border-color: @theme_main;
    background-color: @theme_main;
  }

  .el-dialog__title {
    color: @text_main;
  }

  .el-radio.is-bordered.is-checked {
    border-color: @theme_main;
  }

  .el-card {
    background-color: @theme_back;
    color: @text_main;
    border-color: @theme_border;
    position: relative;
  }

  .el-dialog,
  .el-popover {
    background-color: @theme_back;
    border: 1px solid @theme_border;
  }

  .el-message-box {
    max-width: 98vw;
  }
}

.setting-items {
  margin: -16px 0;
  .setting-item {
    padding: 8px 0;
    border-bottom: 1px solid @text_sliver_light;
    &:last-child {
      margin-bottom: 0;
      border-bottom: 0;
    }
    line-height: 40px;
  }
}

.setting-item {
  display: flex;
  flex-wrap: wrap;
  margin: 0;

  .title {
    text-align: right;
    float: left;
    padding: 0 12px 0 0;
    color: @text_grey;
    vertical-align: middle;
  }
}
